package com.fengxing.ams.web.facade;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.fengxing.ams.web.facade.intf.IPurchaseFacade;
import com.fengxing.ams.web.facade.mouble.purchase.IPurchaseDAO;
import com.fengxing.ams.web.facade.mouble.purchase.PurchaseVO;

@Component
@Transactional
public class PurchaseFacade implements IPurchaseFacade {

	@Autowired
	IPurchaseDAO purchaseDAO;
	
	@Override
	public void save(PurchaseVO purchase) {
		this.purchaseDAO.save(purchase);
	}

	@Override
	public List<PurchaseVO> findByVipId(String id) {
		return this.purchaseDAO.findByVipId(id);
	}

	@Override
	public List<PurchaseVO> queryByTime(Date todayStartTime, Date endTime) {
		return this.purchaseDAO.queryByTime(todayStartTime, endTime);
	}

}
